Since ES5, trailing commas in arrays and object literals are valid.
We generally haven't used them so far, but they are actually a good
idea, as they make additions and removals in diffs much cleaner.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
GLib.set_prgname('gnome-shell-extension-prefs');
super._init({
application_id: 'org.gnome.shell.ExtensionPrefs',
- flags: Gio.ApplicationFlags.HANDLES_COMMAND_LINE
+ flags: Gio.ApplicationFlags.HANDLES_COMMAND_LINE,
});
this._startupUuid = null;
let dialog = new Gtk.Window({
modal: !this._skipMainWindow,
- type_hint: Gdk.WindowTypeHint.DIALOG
+ type_hint: Gdk.WindowTypeHint.DIALOG,
});
dialog.set_titlebar(new Gtk.HeaderBar({
show_close_button: true,
title: row.name,
- visible: true
+ visible: true,
}));
if (this._skipMainWindow) {
_buildErrorUI(row, exc) {
let scroll = new Gtk.ScrolledWindow({
hscrollbar_policy: Gtk.PolicyType.NEVER,
- propagate_natural_height: true
+ propagate_natural_height: true,
});
let box = new Gtk.Box({
orientation: Gtk.Orientation.VERTICAL,
spacing: 12,
margin: 100,
- margin_bottom: 60
+ margin_bottom: 60,
});
scroll.add(box);
let label = new Gtk.Label({
label: '<span size="x-large">%s</span>'.format(_("Something’s gone wrong")),
- use_markup: true
+ use_markup: true,
});
label.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL);
box.add(label);
label = new Gtk.Label({
label: _("We’re very sorry, but there’s been a problem: the settings for this extension can’t be displayed. We recommend that you report the issue to the extension authors."),
justify: Gtk.Justification.CENTER,
- wrap: true
+ wrap: true,
});
box.add(label);
let expander = new Expander({
label: _("Technical Details"),
- margin_top: 12
+ margin_top: 12,
});
box.add(expander);
top_margin: 12,
bottom_margin: 12,
left_margin: 12,
- right_margin: 12
+ right_margin: 12,
});
let toolbar = new Gtk.Toolbar();
let copyButton = new Gtk.ToolButton({
icon_name: 'edit-copy-symbolic',
- tooltip_text: _("Copy Error")
+ tooltip_text: _("Copy Error"),
});
toolbar.add(copyButton);
'```', // '`'
exc.stack.replace(/\n$/, ''), // stack without trailing newline
'```', // '`'
- ''
+ '',
];
clipboard.set_text(lines.join('\n'), -1);
});
label: _("Homepage"),
tooltip_text: _("Visit extension homepage"),
no_show_all: true,
- visible: row.url != null
+ visible: row.url != null,
});
toolbar.add(urlButton);
});
let expandedBox = new Gtk.Box({
- orientation: Gtk.Orientation.VERTICAL
+ orientation: Gtk.Orientation.VERTICAL,
});
expandedBox.add(textview);
expandedBox.add(toolbar);
Gio.SettingsBindFlags.INVERT_BOOLEAN);
this._mainStack = new Gtk.Stack({
- transition_type: Gtk.StackTransitionType.CROSSFADE
+ transition_type: Gtk.StackTransitionType.CROSSFADE,
});
this._window.add(this._mainStack);
'label', 'label', 'label',
GObject.ParamFlags.READWRITE,
null
- )
- }
+ ),
+ },
}, class Expander extends Gtk.Box {
_init(params = {}) {
this._labelText = null;
super._init(Object.assign(params, {
orientation: Gtk.Orientation.VERTICAL,
- spacing: 0
+ spacing: 0,
}));
this._frame = new Gtk.Frame({
shadow_type: Gtk.ShadowType.IN,
- hexpand: true
+ hexpand: true,
});
let eventBox = new Gtk.EventBox();
let hbox = new Gtk.Box({
spacing: 6,
- margin: 12
+ margin: 12,
});
eventBox.add(hbox);
this._arrow = new Gtk.Image({
- icon_name: 'pan-end-symbolic'
+ icon_name: 'pan-end-symbolic',
});
hbox.add(this._arrow);
this._revealer = new Gtk.Revealer();
this._childBin = new Gtk.Frame({
- shadow_type: Gtk.ShadowType.IN
+ shadow_type: Gtk.ShadowType.IN,
});
this._revealer.add(this._childBin);
this._gesture = new Gtk.GestureMultiPress({
widget: this._frame,
button: 0,
- exclusive: true
+ exclusive: true,
});
this._gesture.connect('released', (gesture, nPress) => {
if (nPress == 1)
super._init({
orientation: Gtk.Orientation.VERTICAL,
spacing: 6,
- margin: 32
+ margin: 32,
});
let image = new Gtk.Image({
pixel_size: 96,
visible: true,
vexpand: true,
- valign: Gtk.Align.END
+ valign: Gtk.Align.END,
});
image.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL);
this.add(image);
let label = new Gtk.Label({
label: `<b><span size="x-large">${_("No Extensions Installed")}</span></b>`,
use_markup: true,
- visible: true
+ visible: true,
});
label.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL);
this.add(label);
hexpand: true,
vexpand: (appInfo == null),
halign: Gtk.Align.CENTER,
- valign: Gtk.Align.START
+ valign: Gtk.Align.START,
});
this.add(desc);
let button = new Gtk.Button({
label: _("Browse in Software"),
image: new Gtk.Image({
- icon_name: "org.gnome.Software-symbolic"
+ icon_name: "org.gnome.Software-symbolic",
}),
always_show_image: true,
margin_top: 12,
visible: true,
halign: Gtk.Align.CENTER,
valign: Gtk.Align.START,
- vexpand: true
+ vexpand: true,
});
this.add(button);
orientation: Gtk.Orientation.VERTICAL,
spacing: 12,
margin: 100,
- margin_bottom: 60
+ margin_bottom: 60,
});
let label = new Gtk.Label({
label: '<span size="x-large">%s</span>'.format(
_("Something’s gone wrong")),
- use_markup: true
+ use_markup: true,
});
label.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL);
this.add(label);
label = new Gtk.Label({
label: _("We’re very sorry, but it was not possible to get the list of installed extensions. Make sure you are logged into GNOME and try again."),
justify: Gtk.Justification.CENTER,
- wrap: true
+ wrap: true,
});
this.add(label);
this._switch = new Gtk.Switch({
valign: Gtk.Align.CENTER,
sensitive: this._canToggle(),
- state: this._extension.state === ExtensionState.ENABLED
+ state: this._extension.state === ExtensionState.ENABLED,
});
this._notifyActiveId = this._switch.connect('notify::active', () => {
if (this._switch.active)
log(`ERROR: ${s}`);
},
- userdatadir: GLib.build_filenamev([GLib.get_user_data_dir(), 'gnome-shell'])
+ userdatadir: GLib.build_filenamev([GLib.get_user_data_dir(), 'gnome-shell']),
};
String.prototype.format = Format.format;
var AuthPromptMode = {
UNLOCK_ONLY: 0,
- UNLOCK_OR_LOG_IN: 1
+ UNLOCK_OR_LOG_IN: 1,
};
var AuthPromptStatus = {
NOT_VERIFYING: 0,
VERIFYING: 1,
VERIFICATION_FAILED: 2,
- VERIFICATION_SUCCEEDED: 3
+ VERIFICATION_SUCCEEDED: 3,
};
var BeginRequestType = {
PROVIDE_USERNAME: 0,
- DONT_PROVIDE_USERNAME: 1
+ DONT_PROVIDE_USERNAME: 1,
};
var AuthPrompt = GObject.registerClass({
'next': {},
'prompted': {},
'reset': { param_types: [GObject.TYPE_UINT] },
- }
+ },
}, class AuthPrompt extends St.BoxLayout {
_init(gdmClient, mode) {
super._init({
style_class: 'login-dialog-prompt-layout',
- vertical: true
+ vertical: true,
});
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
if (this._spinner)
this._spinner.stop();
}
- }
+ },
});
}
}
opacity: 255,
duration: DEFAULT_BUTTON_WELL_ANIMATION_TIME,
delay: DEFAULT_BUTTON_WELL_ANIMATION_DELAY,
- mode: Clutter.AnimationMode.LINEAR
+ mode: Clutter.AnimationMode.LINEAR,
});
}
}
this._message.ease({
opacity: 0,
duration: MESSAGE_FADE_OUT_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
const _MAX_BOTTOM_MENU_ITEMS = 5;
var UserListItem = GObject.registerClass({
- Signals: { 'activate': {} }
+ Signals: { 'activate': {} },
}, class UserListItem extends St.Button {
_init(user) {
let layout = new St.BoxLayout({
Signals: {
'activate': { param_types: [UserListItem.$gtype] },
'item-added': { param_types: [UserListItem.$gtype] },
- }
+ },
}, class UserList extends St.ScrollView {
_init() {
super._init({
let value = (box.y1 + adjustment.step_increment / 2.0) - (adjustment.page_size / 2.0);
adjustment.ease(value, {
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- duration: _SCROLL_ANIMATION_TIME
+ duration: _SCROLL_ANIMATION_TIME,
});
}
});
var SessionMenuButton = GObject.registerClass({
- Signals: { 'session-activated': { param_types: [GObject.TYPE_STRING] } }
+ Signals: { 'session-activated': { param_types: [GObject.TYPE_STRING] } },
}, class SessionMenuButton extends St.Bin {
_init() {
let gearIcon = new St.Icon({ icon_name: 'emblem-system-symbolic' });
can_focus: true,
accessible_name: _("Choose Session"),
accessible_role: Atk.Role.MENU,
- child: gearIcon
+ child: gearIcon,
});
super._init({ child: button });
this._bannerView.ease({
opacity: 255,
duration: _FADE_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
this._authPrompt.ease({
opacity: 255,
duration: _FADE_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
this._fadeInBannerView();
}
if (this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
this._authPrompt.reset();
this._unbindOpacity();
- }
+ },
});
}
onComplete: () => {
this._greeter.call_start_session_when_ready_sync(serviceName, true, null);
this._unbindOpacity();
- }
+ },
});
}
this.ease({
opacity: 255,
duration: 1000,
- mode: Clutter.AnimationMode.EASE_IN_QUAD
+ mode: Clutter.AnimationMode.EASE_IN_QUAD,
});
return true;
NONE: 0,
ERROR: 1,
INFO: 2,
- HINT: 3
+ HINT: 3,
};
function fadeInActor(actor) {
onComplete: () => {
this.set_height(-1);
hold.release();
- }
+ },
});
return hold;
this.hide();
this.set_height(-1);
hold.release();
- }
+ },
});
return hold;
}
onComplete: () => {
clone.destroy();
hold.release();
- }
+ },
});
return hold;
}
var ExtensionType = {
SYSTEM: 1,
- PER_USER: 2
+ PER_USER: 2,
};
var ExtensionState = {
// Used as an error state for operations on unknown extensions,
// should never be in a real extensionMeta object.
- UNINSTALLED: 99
+ UNINSTALLED: 99,
};
const SERIALIZED_PROPERTIES = ['type', 'state', 'path', 'error', 'hasPrefs', 'canChange'];
AVAILABLE: 0,
INVISIBLE: 1,
BUSY: 2,
- IDLE: 3
+ IDLE: 3,
};
var PresenceProxy = Gio.DBusProxy.makeProxyWrapper(PresenceIface);
'is-hidden': GLib.Variant.new('b', window.is_hidden()),
'has-focus': GLib.Variant.new('b', (window == focusWindow)),
'width': GLib.Variant.new('u', frameRect.width),
- 'height': GLib.Variant.new('u', frameRect.height)
+ 'height': GLib.Variant.new('u', frameRect.height),
};
// These properties may not be available for all windows:
'capabilities', 'capabilities', 'capabilities',
GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
NM.DeviceModemCapabilities.$gtype,
- NM.DeviceModemCapabilities.NONE)
+ NM.DeviceModemCapabilities.NONE),
},
}, class BroadbandModem extends ModemBase {
_init(path, capabilities) {
'orientation-lock-icon',
'orientation-lock-icon',
GObject.ParamFlags.READWRITE,
- null)
- }
+ null),
+ },
}, class SystemActions extends GObject.Object {
_init() {
super._init();
iconName: 'system-shutdown-symbolic',
// Translators: A list of keywords that match the power-off action, separated by semicolons
keywords: _("power off;shutdown;reboot;restart").split(/[; ]/),
- available: false
+ available: false,
});
this._actions.set(LOCK_SCREEN_ACTION_ID, {
// Translators: The name of the lock screen action in search
iconName: 'system-lock-screen-symbolic',
// Translators: A list of keywords that match the lock screen action, separated by semicolons
keywords: _("lock screen").split(/[; ]/),
- available: false
+ available: false,
});
this._actions.set(LOGOUT_ACTION_ID, {
// Translators: The name of the logout action in search
iconName: 'application-exit-symbolic',
// Translators: A list of keywords that match the logout action, separated by semicolons
keywords: _("logout;log out;sign off").split(/[; ]/),
- available: false
+ available: false,
});
this._actions.set(SUSPEND_ACTION_ID, {
// Translators: The name of the suspend action in search
iconName: 'media-playback-pause-symbolic',
// Translators: A list of keywords that match the suspend action, separated by semicolons
keywords: _("suspend;sleep").split(/[; ]/),
- available: false
+ available: false,
});
this._actions.set(SWITCH_USER_ACTION_ID, {
// Translators: The name of the switch user action in search
iconName: 'system-switch-user-symbolic',
// Translators: A list of keywords that match the switch user action, separated by semicolons
keywords: _("switch user").split(/[; ]/),
- available: false
+ available: false,
});
this._actions.set(LOCK_ORIENTATION_ACTION_ID, {
// Translators: The name of the lock orientation action in search
iconName: '',
// Translators: A list of keywords that match the lock orientation action, separated by semicolons
keywords: _("lock orientation;screen;rotation").split(/[; ]/),
- available: false
+ available: false,
});
this._loginScreenSettings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
adjustment.ease(value, {
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- duration: SCROLL_TIME
+ duration: SCROLL_TIME,
});
}
duration: params.duration,
mode: Clutter.AnimationMode.EASE_IN_QUAD,
});
- }
+ },
});
- }
+ },
});
}
this._onWeatherProxyReady.bind(this));
this._settings = new Gio.Settings({
- schema_id: 'org.gnome.shell.weather'
+ schema_id: 'org.gnome.shell.weather',
});
this._settings.connect('changed::automatic-location',
this._onAutomaticLocationChanged.bind(this));
units: "us" },
applicationsShowTimeSubsequent:
{ description: "Time to switch to applications view, second time",
- units: "us" }
+ units: "us" },
};
let WINDOW_CONFIGS = [
{ width: 640, height: 480, alpha: false, maximized: true, count: 5, metric: 'overviewFps5Maximized' },
{ width: 640, height: 480, alpha: false, maximized: true, count: 10, metric: 'overviewFps10Maximized' },
{ width: 640, height: 480, alpha: true, maximized: false, count: 5, metric: 'overviewFps5Alpha' },
- { width: 640, height: 480, alpha: true, maximized: false, count: 10, metric: 'overviewFps10Alpha' }
+ { width: 640, height: 480, alpha: true, maximized: false, count: 10, metric: 'overviewFps10Alpha' },
];
function *run() {
Scripting.scriptEvent('desktopShown');
let interfaceSettings = new Gio.Settings({
- schema_id: 'org.gnome.desktop.interface'
+ schema_id: 'org.gnome.desktop.interface',
});
interfaceSettings.set_boolean('enable-animations', false);
const PortalHelperResult = {
CANCELLED: 0,
COMPLETED: 1,
- RECHECK: 2
+ RECHECK: 2,
};
const PortalHelperSecurityLevel = {
NOT_YET_DETERMINED: 0,
SECURE: 1,
- INSECURE: 2
+ INSECURE: 2,
};
const CONNECTIVITY_CHECK_HOST = 'nmcheck.gnome.org';
var DialogResponse = {
OK: 0,
CANCEL: 1,
- CLOSED: 2
+ CLOSED: 2,
};
var AccessDialog = GObject.registerClass(
onComplete: () => {
thumbnailsActor.destroy();
this.thumbnailsVisible = false;
- }
+ },
});
this._thumbnails = null;
if (this._switcherList._items[this._selectedIndex])
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
this.thumbnailsVisible = true;
- }
+ },
});
this._switcherList._items[this._selectedIndex].add_accessible_state(Atk.StateType.EXPANDED);
});
var CyclerPopup = GObject.registerClass({
- GTypeFlags: GObject.TypeFlags.ABSTRACT
+ GTypeFlags: GObject.TypeFlags.ABSTRACT,
}, class CyclerPopup extends SwitcherPopup.SwitcherPopup {
_init() {
super._init();
opacity: 255,
delay: SPINNER_ANIMATION_DELAY,
duration: SPINNER_ANIMATION_TIME,
- mode: Clutter.AnimationMode.LINEAR
+ mode: Clutter.AnimationMode.LINEAR,
});
} else {
this.opacity = 255;
opacity: 0,
duration: SPINNER_ANIMATION_TIME,
mode: Clutter.AnimationMode.LINEAR,
- onComplete: () => super.stop()
+ onComplete: () => super.stop(),
});
} else {
this.opacity = 0;
'use-pagination': GObject.ParamSpec.boolean(
'use-pagination', 'use-pagination', 'use-pagination',
GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
- false)
+ false),
},
Signals: {
'view-loaded': {},
- }
+ },
}, class BaseAppView extends St.Widget {
_init(params = {}, gridParams) {
super._init(params);
columnLimit: MAX_COLUMNS,
minRows: MIN_ROWS,
minColumns: MIN_COLUMNS,
- padWithSpacing: true
+ padWithSpacing: true,
}, true);
if (this.use_pagination)
let params = {
duration: VIEWS_SWITCH_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
};
if (animationDirection == IconGrid.AnimationDirection.IN) {
this.show();
});
var AllView = GObject.registerClass({
- Signals: { 'space-ready': {} }
+ Signals: { 'space-ready': {} },
}, class AllView extends BaseAppView {
_init() {
super._init({
layout_manager: new Clutter.BinLayout(),
x_expand: true,
y_expand: true,
- use_pagination: true
+ use_pagination: true,
});
- this._scrollView = new St.ScrollView({ style_class: 'all-apps',
- x_expand: true,
- y_expand: true,
- reactive: true, });
+ this._scrollView = new St.ScrollView({
+ style_class: 'all-apps',
+ x_expand: true,
+ y_expand: true,
+ reactive: true,
+ });
this.add_actor(this._scrollView);
this._grid._delegate = this;
opacity: 0,
duration: VIEWS_SWITCH_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => (this.opacity = 255)
+ onComplete: () => (this.opacity = 255),
});
}
this._grid.currentPage = pageNumber;
this._adjustment.ease(this._grid.getPageY(pageNumber), {
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- duration: time
+ duration: time,
});
this._pageIndicators.setCurrentPage(pageNumber);
this._items[id].ease({
opacity,
duration: INACTIVE_GRID_OPACITY_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
}
_onDragBegin() {
this._dragMonitor = {
- dragMotion: this._onDragMotion.bind(this)
+ dragMotion: this._onDragMotion.bind(this),
};
DND.addDragMonitor(this._dragMonitor);
}
let newFolderPath = this._folderSettings.path.concat('folders/', newFolderId, '/');
let newFolderSettings = new Gio.Settings({
schema_id: 'org.gnome.desktop.app-folders.folder',
- path: newFolderPath
+ path: newFolderPath,
});
if (!newFolderSettings) {
log('Error creating new folder');
style_class: 'frequent-apps',
layout_manager: new Clutter.BinLayout(),
x_expand: true,
- y_expand: true
+ y_expand: true,
}, { fillParent: true });
this._noFrequentAppsLabel = new St.Label({ text: _("Frequently used applications will appear here"),
var Views = {
FREQUENT: 0,
- ALL: 1
+ ALL: 1,
};
var ControlsBoxLayout = GObject.registerClass(
style_class: 'app-display',
vertical: true,
x_expand: true,
- y_expand: true
+ y_expand: true,
});
this._privacySettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.privacy' });
this._controls.ease({
opacity: finalOpacity,
duration: IconGrid.ANIMATION_TIME_IN,
- mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
});
currentView.animate(animationDirection, onComplete);
super._init({
layout_manager: new Clutter.BinLayout(),
x_expand: true,
- y_expand: true
+ y_expand: true,
});
// If it not expand, the parent doesn't take into account its preferred_width when allocating
this._scrollView = new St.ScrollView({
overlay_scrollbars: true,
x_expand: true,
- y_expand: true
+ y_expand: true,
});
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
this.add_actor(this._scrollView);
Signals: {
'apps-changed': {},
'name-changed': {},
- }
+ },
}, class FolderIcon extends St.Button {
_init(id, path, parentView) {
super._init({
this.icon = new IconGrid.BaseIcon('', {
createIcon: this._createIcon.bind(this),
- setSizeManually: true
+ setSizeManually: true,
});
this.set_child(this.icon);
this.label_actor = this.icon.label;
var AppFolderPopup = GObject.registerClass({
Signals: {
'open-state-changed': { param_types: [GObject.TYPE_BOOLEAN] },
- }
+ },
}, class AppFolderPopup extends St.Widget {
_init(source, side) {
super._init({
x_expand: true,
y_expand: true,
x_align: Clutter.ActorAlign.CENTER,
- y_align: Clutter.ActorAlign.START
+ y_align: Clutter.ActorAlign.START,
});
this._source = source;
this._view = source.view;
this._isOpen = false;
this.parentOffset = 0;
- this._boxPointer = new BoxPointer.BoxPointer(this._arrowSide,
- { style_class: 'app-folder-popup-bin',
- x_expand: true, });
+ this._boxPointer = new BoxPointer.BoxPointer(this._arrowSide, {
+ style_class: 'app-folder-popup-bin',
+ x_expand: true,
+ });
this._boxPointer.style_class = 'app-folder-popup';
this.add_actor(this._boxPointer);
global.focus_manager.add_group(this);
this._grabHelper = new GrabHelper.GrabHelper(this, {
- actionMode: Shell.ActionMode.POPUP
+ actionMode: Shell.ActionMode.POPUP,
});
this._grabHelper.addActor(Main.layoutManager.overviewGroup);
this.connect('destroy', this._onDestroy.bind(this));
Signals: {
'menu-state-changed': { param_types: [GObject.TYPE_BOOLEAN] },
'sync-tooltip': {},
- }
+ },
}, class AppIcon extends St.Button {
_init(app, iconParams = {}) {
super._init({
scale_y: 1,
duration: APP_ICON_SCALE_IN_TIME,
delay: APP_ICON_SCALE_IN_DELAY,
- mode: Clutter.AnimationMode.EASE_OUT_QUINT
+ mode: Clutter.AnimationMode.EASE_OUT_QUINT,
});
}
this.ease({
scale_x: 0.75,
scale_y: 0.75,
- opacity: 128
+ opacity: 128,
});
}
this.ease({
scale_x: 1.0,
scale_y: 1.0,
- opacity: 255
+ opacity: 255,
});
}
this.icon.label.opacity = 0;
this.icon.icon.ease({
scale_x: FOLDER_SUBICON_FRACTION,
- scale_y: FOLDER_SUBICON_FRACTION
+ scale_y: FOLDER_SUBICON_FRACTION,
});
}
this.icon.label.opacity = 255;
this.icon.icon.ease({
scale_x: 1.0,
- scale_y: 1.0
+ scale_y: 1.0,
});
}
var AudioDevice = {
HEADPHONES: 1 << 0,
HEADSET: 1 << 1,
- MICROPHONE: 1 << 2
+ MICROPHONE: 1 << 2,
};
const AudioDeviceSelectionIface = loadInterfaceXML('org.gnome.Shell.AudioDeviceSelection');
var AudioDeviceSelectionDialog = GObject.registerClass({
- Signals: { 'device-selected': { param_types: [GObject.TYPE_UINT] } }
+ Signals: { 'device-selected': { param_types: [GObject.TYPE_UINT] } },
}, class AudioDeviceSelectionDialog extends ModalDialog.ModalDialog {
_init(devices) {
super._init({ styleClass: 'audio-device-selection-dialog' });
}
var Background = GObject.registerClass({
- Signals: { 'loaded': {}, 'bg-changed': {} }
+ Signals: { 'loaded': {}, 'bg-changed': {} },
}, class Background extends Meta.Background {
_init(params) {
params = Params.parse(params, { monitorIndex: 0,
this._updateAnimation();
this._watchFile(file);
- }
+ },
});
}
let _systemBackground;
var SystemBackground = GObject.registerClass({
- Signals: { 'loaded': {} }
+ Signals: { 'loaded': {} },
}, class SystemBackground extends Meta.BackgroundActor {
_init() {
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/noise-texture.png');
super._init({
meta_display: global.display,
monitor: 0,
- background: _systemBackground
+ background: _systemBackground,
});
let cache = Meta.BackgroundImageCache.get_default();
layoutManager: this._layoutManager,
settings: this._settings,
file,
- style
+ style,
});
background._changedId = background.connect('bg-changed', () => {
opacity: 0,
duration: FADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => oldBackgroundActor.destroy()
+ onComplete: () => oldBackgroundActor.destroy(),
});
}
'overdrive-start': GObject.ParamSpec.double(
'overdrive-start', 'overdrive-start', 'overdrive-start',
GObject.ParamFlags.READWRITE,
- 1, 2, 1)
- }
+ 1, 2, 1),
+ },
}, class BarLevel extends St.DrawingArea {
_init(params) {
this._maxValue = 1;
let defaultParams = {
style_class: 'barlevel',
- accessible_role: Atk.Role.LEVEL_BAR
+ accessible_role: Atk.Role.LEVEL_BAR,
};
super._init(Object.assign(defaultParams, params));
this.connect('allocation-changed', (actor, box) => {
this._muteInput = false;
if (onComplete)
onComplete();
- }
+ },
});
}
this.translation_y = 0;
if (onComplete)
onComplete();
- }
+ },
});
}
/* Translators: Calendar grid abbreviation for Friday */
NC_("grid friday", "F"),
/* Translators: Calendar grid abbreviation for Saturday */
- NC_("grid saturday", "S")
+ NC_("grid saturday", "S"),
];
return Shell.util_translate_time_string(abbreviations[dayNumber]);
}
GObject.ParamFlags.READABLE,
false),
},
- Signals: { 'changed': {} }
+ Signals: { 'changed': {} },
}, class EventSourceBase extends GObject.Object {
get isLoading() {
throw new GObject.NotImplementedError(`isLoading in ${this.constructor.name}`);
});
var Calendar = GObject.registerClass({
- Signals: { 'selected-date-changed': { param_types: [GLib.DateTime.$gtype] } }
+ Signals: { 'selected-date-changed': { param_types: [GLib.DateTime.$gtype] } },
}, class Calendar extends St.Widget {
_init() {
this._weekStart = Shell.util_get_week_start();
super._init({
style_class: 'calendar',
layout_manager: new Clutter.GridLayout(),
- reactive: true
+ reactive: true,
});
this._buildHeader();
super._init({
style_class: 'event-time',
x_align: Clutter.ActorAlign.START,
- y_align: Clutter.ActorAlign.END
+ y_align: Clutter.ActorAlign.END,
});
this._datetime = datetime;
}
style_class: 'message-list',
layout_manager: new Clutter.BinLayout(),
x_expand: true,
- y_expand: true
+ y_expand: true,
});
this._placeholder = new Placeholder();
x_expand: true, y_expand: true });
this.add_actor(box);
- this._scrollView = new St.ScrollView({ style_class: 'vfade',
- overlay_scrollbars: true,
- x_expand: true, y_expand: true, });
+ this._scrollView = new St.ScrollView({
+ style_class: 'vfade',
+ overlay_scrollbars: true,
+ x_expand: true, y_expand: true,
+ });
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
box.add_actor(this._scrollView);
var CloseDialog = GObject.registerClass({
Implements: [Meta.CloseDialog],
Properties: {
- 'window': GObject.ParamSpec.override('window', Meta.CloseDialog)
+ 'window': GObject.ParamSpec.override('window', Meta.CloseDialog),
},
}, class CloseDialog extends GObject.Object {
_init(window) {
scale_y: 1,
mode: Clutter.AnimationMode.LINEAR,
duration: DIALOG_TRANSITION_TIME,
- onComplete: this._onFocusChanged.bind(this)
+ onComplete: this._onFocusChanged.bind(this),
});
}
scale_y: 0,
mode: Clutter.AnimationMode.LINEAR,
duration: DIALOG_TRANSITION_TIME,
- onComplete: () => dialog.destroy()
+ onComplete: () => dialog.destroy(),
});
}
RUN: 0,
IGNORE: 1,
FILES: 2,
- ASK: 3
+ ASK: 3,
};
// misc utils
const DELAYED_RESET_TIMEOUT = 200;
var AuthenticationDialog = GObject.registerClass({
- Signals: { 'done': { param_types: [GObject.TYPE_BOOLEAN] } }
+ Signals: { 'done': { param_types: [GObject.TYPE_BOOLEAN] } },
}, class AuthenticationDialog extends ModalDialog.ModalDialog {
_init(actionId, body, cookie, userNames) {
super._init({ styleClass: 'prompt-dialog' });
var NotificationDirection = {
SENT: 'chat-sent',
- RECEIVED: 'chat-received'
+ RECEIVED: 'chat-received',
};
function makeMessageFromTpMessage(tpMessage, direction) {
text,
sender: tpMessage.sender.alias,
timestamp,
- direction
+ direction,
};
}
text: event.get_message(),
sender: event.get_sender().get_alias(),
timestamp: event.get_timestamp(),
- direction
+ direction,
};
}
'message-removed': { param_types: [Tp.Message.$gtype] },
'message-added': { param_types: [Tp.Message.$gtype] },
'timestamp-changed': { param_types: [Tp.Message.$gtype] },
- }
+ },
}, class ChatNotification extends MessageTray.Notification {
_init(source) {
super._init(source, source.title, null,
var SortGroup = {
TOP: 0,
MIDDLE: 1,
- BOTTOM: 2
+ BOTTOM: 2,
};
var CtrlAltTabManager = class CtrlAltTabManager {
_init(app) {
super._init(app, {
setSizeManually: true,
- showLabel: false
+ showLabel: false,
});
}
this.label.ease({
opacity: 255,
duration: DASH_ITEM_LABEL_SHOW_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
opacity: 0,
duration: DASH_ITEM_LABEL_HIDE_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => this.label.hide()
+ onComplete: () => this.label.hide(),
});
}
scale_y: 1,
opacity: 255,
duration: time,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
opacity: 0,
duration: DASH_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => this.destroy()
+ onComplete: () => this.destroy(),
});
}
});
const baseIconSizes = [16, 22, 24, 32, 48, 64];
var Dash = GObject.registerClass({
- Signals: { 'icon-size-changed': {} }
+ Signals: { 'icon-size-changed': {} },
}, class Dash extends St.Bin {
_init() {
this._maxHeight = -1;
_onDragBegin() {
this._dragCancelled = false;
this._dragMonitor = {
- dragMotion: this._onDragMotion.bind(this)
+ dragMotion: this._onDragMotion.bind(this),
};
DND.addDragMonitor(this._dragMonitor);
width: targetWidth,
height: targetHeight,
duration: DASH_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
}
style_class: 'datemenu-today-button',
x_expand: true,
can_focus: true,
- reactive: false
+ reactive: false,
});
let hbox = new St.BoxLayout({ vertical: true });
Gio.DBusProxyFlags.DO_NOT_AUTO_START | Gio.DBusProxyFlags.GET_INVALIDATED_PROPERTIES);
this._settings = new Gio.Settings({
- schema_id: 'org.gnome.shell.world-clocks'
+ schema_id: 'org.gnome.shell.world-clocks',
});
this._settings.connect('changed', this._clocksChanged.bind(this));
this._clocksChanged();
infos.forEach(fc => {
let [ok_, timestamp] = fc.get_value_update();
let timeStr = Util.formatTime(new Date(timestamp * 1000), {
- timeOnly: true
+ timeOnly: true,
});
let icon = new St.Icon({ style_class: 'weather-forecast-icon',
icon_size: 16,
visible: false,
y_expand: true,
- y_align: Clutter.ActorAlign.CENTER
+ y_align: Clutter.ActorAlign.CENTER,
});
this._sources = [];
'body': GObject.ParamSpec.string('body', 'body', 'body',
GObject.ParamFlags.READWRITE |
GObject.ParamFlags.CONSTRUCT,
- null)
- }
+ null),
+ },
}, class MessageDialogContent extends St.BoxLayout {
_init(params) {
this._icon = new St.Icon({ y_align: Clutter.ActorAlign.START });
set icon(icon) {
this._icon.set({
gicon: icon,
- visible: icon != null
+ visible: icon != null,
});
this.notify('icon');
}
_setLabel(label, prop, value) {
label.set({
text: value || '',
- visible: value != null
+ visible: value != null,
});
this.notify(prop);
}
NO_DROP: 0,
COPY_DROP: 1,
MOVE_DROP: 2,
- CONTINUE: 3
+ CONTINUE: 3,
};
var DragState = {
var DRAG_CURSOR_MAP = {
0: Meta.Cursor.DND_UNSUPPORTED_TARGET,
1: Meta.Cursor.DND_COPY,
- 2: Meta.Cursor.DND_MOVE
+ 2: Meta.Cursor.DND_MOVE,
};
var DragDropResult = {
FAILURE: 0,
SUCCESS: 1,
- CONTINUE: 2
+ CONTINUE: 2,
};
var dragMonitors = [];
scale_x: scale * origScale,
scale_y: scale * origScale,
duration: SCALE_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
this._dragActor.get_transition('scale-x').connect('new-frame', () => {
y: this._dragY,
dragActor: this._dragActor,
source: this.actor._delegate,
- targetActor: target
+ targetActor: target,
};
let targetActorDestroyHandlerId;
let dropEvent = {
dropActor: this._dragActor,
targetActor: target,
- clutterEvent: event
+ clutterEvent: event,
};
for (let i = 0; i < dragMonitors.length; i++) {
let dropFunc = dragMonitors[i].dragDrop;
y: snapBackY,
scale_x: snapBackScale,
scale_y: snapBackScale,
- duration: SNAP_BACK_ANIMATION_TIME
+ duration: SNAP_BACK_ANIMATION_TIME,
});
}
this._dragActor.opacity = 0;
this._animateDragEnd(eventTime, {
- duration: REVERT_ANIMATION_TIME
+ duration: REVERT_ANIMATION_TIME,
});
}
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
this._onAnimationComplete(this._dragActor, eventTime);
- }
+ },
}));
}
SHUTDOWN: 1 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_SHUTDOWN */,
RESTART: 2 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_RESTART */,
UPDATE_RESTART: 3,
- UPGRADE_RESTART: 4
+ UPGRADE_RESTART: 4,
};
const DialogContent = {
1 /* DialogType.SHUTDOWN */: shutdownDialogContent,
2 /* DialogType.RESTART */: restartDialogContent,
3 /* DialogType.UPDATE_RESTART */: restartUpdateDialogContent,
- 4 /* DialogType.UPGRADE_RESTART */: restartUpgradeDialogContent
+ 4 /* DialogType.UPGRADE_RESTART */: restartUpgradeDialogContent,
};
var MAX_USERS_IN_SESSION_DIALOG = 5;
let { stack } = new Error();
log(`Usage of object.actor is deprecated for ${klass}\n${stack}`);
return this;
- }
+ },
});
St.set_slow_down_factor = function (factor) {
let content = new Dialog.MessageDialogContent({
title: _("Download and install “%s” from extensions.gnome.org?").format(info.name),
icon: new Gio.FileIcon({
- file: Gio.File.new_for_uri(`${REPOSITORY_URL_BASE}${info.icon}`)
- })
+ file: Gio.File.new_for_uri(`${REPOSITORY_URL_BASE}${info.icon}`),
+ }),
});
this.contentLayout.add(content);
path: dir.get_path(),
error: '',
hasPrefs: dir.get_child('prefs.js').query_exists(null),
- canChange: false
+ canChange: false,
};
this._extensions.set(uuid, extension);
'cursor-up': {},
'next-page': {},
'previous-page': {},
- }
+ },
}, class CandidateArea extends St.BoxLayout {
_init() {
super._init({
vertical: true,
reactive: true,
- visible: false
+ visible: false,
});
this._candidateBoxes = [];
for (let i = 0; i < MAX_CANDIDATES_PER_PAGE; ++i) {
var AnimationDirection = {
IN: 0,
- OUT: 1
+ OUT: 1,
};
var APPICON_ANIMATION_OUT_SCALE = 3;
this.label = new St.Label({ text: label });
this.label.clutter_text.set({
x_align: Clutter.ActorAlign.CENTER,
- y_align: Clutter.ActorAlign.CENTER
+ y_align: Clutter.ActorAlign.CENTER,
});
this._box.add_actor(this.label);
} else {
opacity: 0,
duration: APPICON_ANIMATION_OUT_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => actorClone.destroy()
+ onComplete: () => actorClone.destroy(),
});
}
if (isLastItem)
this._animationDone();
actor.reactive = true;
- }
+ },
});
- }
+ },
});
}
}
scale_y: 1,
duration: ANIMATION_TIME_IN,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
- delay
+ delay,
};
if (isLastItem)
opacity: 255,
duration: ANIMATION_FADE_IN_TIME_FOR_ITEM,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
- delay
+ delay,
};
} else {
let isLastItem = actor._distance == maxDist;
scale_y: scaleY,
duration: ANIMATION_TIME_OUT,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
- delay
+ delay,
};
if (isLastItem)
opacity: 0,
duration: ANIMATION_FADE_IN_TIME_FOR_ITEM,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
- delay: ANIMATION_TIME_OUT + delay - ANIMATION_FADE_IN_TIME_FOR_ITEM
+ delay: ANIMATION_TIME_OUT + delay - ANIMATION_FADE_IN_TIME_FOR_ITEM,
};
}
let params = {
translation_y: translationY,
duration: EXTRA_SPACE_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
};
if (i == (children.length - 1))
params.onComplete = () => this.emit('space-opened');
translation_y: 0,
duration: EXTRA_SPACE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
- onComplete: () => this.emit('space-closed')
+ onComplete: () => this.emit('space-closed'),
});
}
}
var InhibitShortcutsDialog = GObject.registerClass({
Implements: [Meta.InhibitShortcutsDialog],
Properties: {
- 'window': GObject.ParamSpec.override('window', Meta.InhibitShortcutsDialog)
- }
+ 'window': GObject.ParamSpec.override('window', Meta.InhibitShortcutsDialog),
+ },
}, class InhibitShortcutsDialog extends GObject.Object {
_init(window) {
super._init();
super._init({
layout_manager: gridLayout,
x_expand: true,
- y_expand: true
+ y_expand: true,
});
this._gridLayout = gridLayout;
this._currentRow = 0;
left: this._currentCol,
top: this._currentRow,
width,
- height
+ height,
};
let row = this._rows[this._rows.length - 1];
'long-press': {},
'pressed': { param_types: [GObject.TYPE_UINT, GObject.TYPE_STRING] },
'released': { param_types: [GObject.TYPE_UINT, GObject.TYPE_STRING] },
- }
+ },
}, class Key extends St.BoxLayout {
_init(key, extendedKeys) {
super._init({ style_class: 'key-container' });
'delta': GObject.ParamSpec.int(
'delta', 'delta', 'delta',
GObject.ParamFlags.READWRITE,
- GLib.MININT32, GLib.MAXINT32, 0)
+ GLib.MININT32, GLib.MAXINT32, 0),
},
Signals: {
'emoji': { param_types: [GObject.TYPE_STRING] },
'page-changed': {
- param_types: [GObject.TYPE_INT, GObject.TYPE_INT, GObject.TYPE_INT]
- }
- }
+ param_types: [GObject.TYPE_INT, GObject.TYPE_INT, GObject.TYPE_INT],
+ },
+ },
}, class EmojiPager extends St.Widget {
_init(sections, nCols, nRows) {
super._init({
layout_manager: new Clutter.BinLayout(),
reactive: true,
- clip_to_allocation: true
+ clip_to_allocation: true,
});
this._sections = sections;
this._nCols = nCols;
duration: time,
onComplete: () => {
this.setCurrentPage(this.getFollowingPage());
- }
+ },
});
}
}
'emoji-selected': { param_types: [GObject.TYPE_STRING] },
'close-request': {},
'toggle': {},
- }
+ },
}, class EmojiSelection extends St.BoxLayout {
_init() {
super._init({
style_class: 'emoji-panel',
x_expand: true,
y_expand: true,
- vertical: true
+ vertical: true,
});
this._sections = [
var Keypad = GObject.registerClass({
Signals: {
'keyval': { param_types: [GObject.TYPE_UINT] },
- }
+ },
}, class Keypad extends AspectContainer {
_init() {
let keys = [
super._init({
layout_manager: new Clutter.BinLayout(),
x_expand: true,
- y_expand: true
+ y_expand: true,
});
let gridLayout = new Clutter.GridLayout({ orientation: Clutter.Orientation.HORIZONTAL,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
this._windowSlideAnimationComplete(window, -deltaY);
- }
+ },
});
} else {
windowActor.ease({
mode: Clutter.AnimationMode.EASE_IN_QUAD,
onComplete: () => {
this._windowSlideAnimationComplete(window, deltaY);
- }
+ },
});
}
}
'work-area': GObject.ParamSpec.boolean('work-area',
'Work-area', 'Track monitor\'s work-area',
GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
- false)
+ false),
},
}, class MonitorConstraint extends Clutter.Constraint {
_init(props) {
const defaultParams = {
trackFullscreen: false,
affectsStruts: false,
- affectsInputRegion: true
+ affectsInputRegion: true,
};
var LayoutManager = GObject.registerClass({
this._bgManagers = [];
this._interfaceSettings = new Gio.Settings({
- schema_id: 'org.gnome.desktop.interface'
+ schema_id: 'org.gnome.desktop.interface',
});
this._interfaceSettings.connect('changed::enable-hot-corners',
backgroundActor.ease({
opacity: 255,
duration: BACKGROUND_FADE_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
}
translation_y: 0,
duration: STARTUP_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => this._startupAnimationComplete()
+ onComplete: () => this._startupAnimationComplete(),
});
}
opacity: 255,
duration: STARTUP_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => this._startupAnimationComplete()
+ onComplete: () => this._startupAnimationComplete(),
});
}
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
this._showKeyboardComplete();
- }
+ },
});
this.emit('keyboard-visible-changed', true);
}
mode: Clutter.AnimationMode.EASE_IN_QUAD,
onComplete: () => {
this._hideKeyboardComplete();
- }
+ },
});
this.emit('keyboard-visible-changed', false);
y: this._y,
width: 3,
height: 3,
- reactive: true
+ reactive: true,
});
this._corner = new Clutter.Actor({ name: 'hot-corner',
'sharpness', 'sharpness', 'sharpness',
GObject.ParamFlags.READWRITE,
0, 1, 0
- )
- }
+ ),
+ },
}, class RadialShaderEffect extends Shell.GLSLEffect {
_init(params) {
this._brightness = undefined;
Properties: {
'active': GObject.ParamSpec.boolean(
'active', 'active', 'active', GObject.ParamFlags.READABLE, false),
- }
+ },
}, class Lightbox extends St.Bin {
_init(container, params) {
params = Params.parse(params, {
reactive: params.inhibitEvents,
width: params.width,
height: params.height,
- visible: false
+ visible: false,
});
this._active = false;
if (!params.width || !params.height) {
this.add_constraint(new Clutter.BindConstraint({
source: container,
- coordinate: Clutter.BindCoordinate.ALL
+ coordinate: Clutter.BindCoordinate.ALL,
}));
}
let easeProps = {
duration: fadeInTime || 0,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
};
let onComplete = () => {
} else {
this.ease(Object.assign(easeProps, {
opacity: 255 * this._fadeFactor,
- onComplete
+ onComplete,
}));
}
}
let easeProps = {
duration: fadeOutTime || 0,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
};
let onComplete = () => this.hide();
scale_x: 1,
scale_y: 1,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- duration: 200
+ duration: 200,
});
} else {
this.set_scale(1, 1);
style_class: 'lg-dialog',
vertical: true,
visible: false,
- reactive: true
+ reactive: true,
});
this._borderPaintTarget = null;
height: naturalHeight,
opacity: 255,
duration,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
}
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
this._completionActor.hide();
- }
+ },
});
}
}
this.ease({
y: this._targetY,
duration,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
this._windowList.update();
y: this._hiddenY,
duration,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => this.hide()
+ onComplete: () => this.hide(),
});
}
x: this._viewPortX,
y: this._viewPortY,
width: this._viewPortWidth,
- height: this._viewPortHeight
+ height: this._viewPortHeight,
});
} else {
this.setScreenPosition(this._screenPosition);
super._init({
clip_to_allocation: false,
width: groupWidth,
- height: groupHeight
+ height: groupHeight,
});
this._horizLeftHair = new Clutter.Actor();
this._horizRightHair = new Clutter.Actor();
sessionMode.currentMode != 'initial-setup') {
GLib.log_structured(LOG_DOMAIN, GLib.LogLevelFlags.LEVEL_MESSAGE, {
'MESSAGE': `GNOME Shell started at ${_startDate}`,
- 'MESSAGE_ID': GNOMESHELL_STARTED_MESSAGE_ID
+ 'MESSAGE_ID': GNOMESHELL_STARTED_MESSAGE_ID,
});
}
let theme = new St.Theme({
application_stylesheet: _cssStylesheet,
- default_stylesheet: _defaultCssStylesheet
+ default_stylesheet: _defaultCssStylesheet,
});
if (theme.default_stylesheet == null)
reactive: true,
style_class: 'url-highlighter',
x_expand: true,
- x_align: Clutter.ActorAlign.START
+ x_align: Clutter.ActorAlign.START,
});
this._linkColor = '#ccccff';
this.connect('style-changed', () => {
'Expansion of the layout, between 0 (collapsed) ' +
'and 1 (fully expanded',
GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
- 0, 1, 0)
+ 0, 1, 0),
},
}, class LabelExpanderLayout extends Clutter.LayoutManager {
_init(params) {
'close': {},
'expanded': {},
'unexpanded': {},
- }
+ },
}, class Message extends St.Button {
_init(title, body) {
super._init({
this.setTitle(title);
titleBox.add_actor(this.titleLabel);
- this._secondaryBin = new St.Bin({ style_class: 'message-secondary-bin',
- x_expand: true, y_expand: true, });
+ this._secondaryBin = new St.Bin({
+ style_class: 'message-secondary-bin',
+ x_expand: true, y_expand: true,
+ });
titleBox.add_actor(this._secondaryBin);
let closeIcon = new St.Icon({ icon_name: 'window-close-symbolic',
this._actionBin.ease({
scale_y: 1,
duration: MessageTray.ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
} else {
this._bodyStack.layout_manager.expansion = 1;
onComplete: () => {
this._actionBin.hide();
this.expanded = false;
- }
+ },
});
} else {
this._bodyStack.layout_manager.expansion = 0;
'can-clear-changed': {},
'empty-changed': {},
'message-focused': { param_types: [Message.$gtype] },
- }
+ },
}, class MessageListSection extends St.BoxLayout {
_init() {
super._init({
style_class: 'message-list-section',
clip_to_allocation: true,
vertical: true,
- x_expand: true
+ x_expand: true,
});
this._list = new St.BoxLayout({ style_class: 'message-list-section-list',
scale_x: 1,
scale_y: 1,
duration: MESSAGE_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
}
scale_x: 1,
scale_y: 1,
duration: MESSAGE_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
};
listItem.ease({
scale_y: 0,
duration: MESSAGE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete
+ onComplete,
});
}
onComplete: () => {
listItem.destroy();
global.sync_pointer();
- }
+ },
});
} else {
listItem.destroy();
duration: MESSAGE_ANIMATION_TIME,
delay: i * delay,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => message.close()
+ onComplete: () => message.close(),
});
}
}
HIDDEN: 0,
SHOWING: 1,
SHOWN: 2,
- HIDING: 3
+ HIDING: 3,
};
// These reasons are useful when we destroy the notifications received through
EXPIRED: 1,
DISMISSED: 2,
SOURCE_CLOSED: 3,
- REPLACED: 4
+ REPLACED: 4,
};
// Message tray has its custom Urgency enumeration. LOW, NORMAL and CRITICAL
LOW: 0,
NORMAL: 1,
HIGH: 2,
- CRITICAL: 3
+ CRITICAL: 3,
};
// The privacy of the details of a notification. USER is for notifications which
'details-in-lock-screen', 'details-in-lock-screen', 'details-in-lock-screen',
GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
false),
- }
+ },
}, class NotificationPolicy extends GObject.Object {
// Do nothing for the default policy. These methods are only useful for the
// GSettings policy.
'activated': {},
'destroy': { param_types: [GObject.TYPE_UINT] },
'updated': { param_types: [GObject.TYPE_BOOLEAN] },
- }
+ },
}, class Notification extends GObject.Object {
_init(source, title, banner, params) {
super._init();
Signals: {
'done-displaying': {},
'unfocused': {},
- }
+ },
}, class NotificationBanner extends Calendar.NotificationMessage {
_init(notification) {
super._init(notification);
'icon-updated': {},
'notification-added': { param_types: [Notification.$gtype] },
'notification-show': { param_types: [Notification.$gtype] },
- }
+ },
}, class Source extends GObject.Object {
_init(title, iconName) {
super._init({ title });
'queue-changed': {},
'source-added': { param_types: [Source.$gtype] },
'source-removed': { param_types: [Source.$gtype] },
- }
+ },
}, class MessageTray extends St.Widget {
_init() {
super._init({
visible: false,
clip_to_allocation: true,
- layout_manager: new Clutter.BinLayout()
+ layout_manager: new Clutter.BinLayout(),
});
this._presence = new GnomeSession.Presence((proxy, _error) => {
this._bannerBin.ease({
opacity: 255,
duration: ANIMATION_TIME,
- mode: Clutter.AnimationMode.LINEAR
+ mode: Clutter.AnimationMode.LINEAR,
});
this._bannerBin.ease({
y: 0,
this._notificationState = State.SHOWN;
this._showNotificationCompleted();
this._updateState();
- }
+ },
});
}
this._bannerBin.ease({
opacity: 0,
duration: ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_BACK
+ mode: Clutter.AnimationMode.EASE_OUT_BACK,
});
this._bannerBin.ease({
y: -this._bannerBin.height,
this._notificationState = State.HIDDEN;
this._hideNotificationCompleted();
this._updateState();
- }
+ },
});
} else {
this._bannerBin.y = -this._bannerBin.height;
CLOSED: 1,
OPENING: 2,
CLOSING: 3,
- FADED_OUT: 4
+ FADED_OUT: 4,
};
var ModalDialog = GObject.registerClass({
GObject.ParamFlags.READABLE,
Math.min(...Object.values(State)),
Math.max(...Object.values(State)),
- State.CLOSED)
+ State.CLOSED),
},
- Signals: { 'opened': {}, 'closed': {} }
+ Signals: { 'opened': {}, 'closed': {} },
}, class ModalDialog extends St.Widget {
_init(params) {
super._init({ visible: false,
onComplete: () => {
this._setState(State.OPENED);
this.emit('opened');
- }
+ },
});
}
opacity: 0,
duration: OPEN_AND_CLOSE_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => this._closeComplete()
+ onComplete: () => this._closeComplete(),
});
} else {
this._closeComplete();
opacity: 0,
duration: FADE_OUT_DIALOG_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => (this.state = State.FADED_OUT)
+ onComplete: () => (this.state = State.FADED_OUT),
});
}
});
EXPIRED: 1,
DISMISSED: 2,
APP_CLOSED: 3,
- UNDEFINED: 4
+ UNDEFINED: 4,
};
var Urgency = {
LOW: 0,
NORMAL: 1,
- CRITICAL: 2
+ CRITICAL: 2,
};
const rewriteRules = {
{ pattern: /^XChat: New public message from: (\S*) \((.*)\)$/,
replacement: '$2 <$1>' },
{ pattern: /^XChat: Highlighted message from: (\S*) \((.*)\)$/,
- replacement: '$2 <$1>' }
- ]
+ replacement: '$2 <$1>' },
+ ],
};
var FdoNotificationDaemon = class FdoNotificationDaemon {
Config.PACKAGE_NAME,
'GNOME',
Config.PACKAGE_VERSION,
- '1.2'
+ '1.2',
];
}
low: MessageTray.Urgency.LOW,
normal: MessageTray.Urgency.NORMAL,
high: MessageTray.Urgency.HIGH,
- urgent: MessageTray.Urgency.CRITICAL
+ urgent: MessageTray.Urgency.CRITICAL,
};
var GtkNotificationDaemonNotification = GObject.registerClass(
x_expand: true,
y_expand: true,
x_align: Clutter.ActorAlign.CENTER,
- y_align: Clutter.ActorAlign.CENTER
+ y_align: Clutter.ActorAlign.CENTER,
});
this._monitorIndex = monitorIndex;
this._level = new BarLevel.BarLevel({
style_class: 'level',
- value: 0
+ value: 0,
});
this._box.add(this._level);
if (this.visible) {
this._level.ease_property('value', value, {
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- duration: LEVEL_ANIMATION_TIME
+ duration: LEVEL_ANIMATION_TIME,
});
} else {
this._level.value = value;
this.ease({
opacity: 255,
duration: FADE_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
onComplete: () => {
this._reset();
Meta.enable_unredirect_for_display(global.display);
- }
+ },
});
return GLib.SOURCE_REMOVE;
}
/* Translators: This is the main view to select
activities. See also note for "Activities" string. */
accessible_name: _("Overview"),
- vertical: true
+ vertical: true,
});
this.add_constraint(new LayoutManager.MonitorConstraint({ primary: true }));
let panelGhost = new St.Bin({
child: new Clutter.Clone({ source: Main.panel }),
reactive: false,
- opacity: 0
+ opacity: 0,
});
this.add_actor(panelGhost);
characters. */
hint_text: _("Type to search…"),
track_hover: true,
- can_focus: true
+ can_focus: true,
});
this._searchEntry.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
let searchEntryBin = new St.Bin({
// XDND
this._dragMonitor = {
- dragMotion: this._onDragMotion.bind(this)
+ dragMotion: this._onDragMotion.bind(this),
};
for (let i = 0; i < backgrounds.length; i++) {
backgrounds[i].ease_property('brightness', 1.0, {
duration: SHADE_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
backgrounds[i].ease_property('vignette-sharpness', 0.0, {
duration: SHADE_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
}
for (let i = 0; i < backgrounds.length; i++) {
backgrounds[i].ease_property('brightness', Lightbox.VIGNETTE_BRIGHTNESS, {
duration: SHADE_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
backgrounds[i].ease_property('vignette-sharpness', Lightbox.VIGNETTE_SHARPNESS, {
duration: SHADE_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
}
this._desktopFade.ease({
opacity: 255,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- duration: ANIMATION_TIME
+ duration: ANIMATION_TIME,
});
}
this._desktopFade.ease({
opacity: 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- duration: ANIMATION_TIME
+ duration: ANIMATION_TIME,
});
}
opacity: 255,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: ANIMATION_TIME,
- onComplete: () => this._showDone()
+ onComplete: () => this._showDone(),
});
this._shadeBackgrounds();
opacity: 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: ANIMATION_TIME,
- onComplete: () => this._hideDone()
+ onComplete: () => this._hideDone(),
});
this._unshadeBackgrounds();
var SlideDirection = {
LEFT: 0,
- RIGHT: 1
+ RIGHT: 1,
};
var SlideLayout = GObject.registerClass({
'translation-x': GObject.ParamSpec.double(
'translation-x', 'translation-x', 'translation-x',
GObject.ParamFlags.READWRITE,
- -Infinity, Infinity, 0)
- }
+ -Infinity, Infinity, 0),
+ },
}, class SlideLayout extends Clutter.FixedLayout {
_init(params) {
this._slideX = 1;
super._init({
layout_manager: this.layout,
style_class: 'overview-controls',
- clip_to_allocation: true
+ clip_to_allocation: true,
});
this._visible = true;
this.ease({
opacity: 255,
duration: SIDE_CONTROLS_ANIMATION_TIME / 2,
- mode: Clutter.AnimationMode.EASE_IN_QUAD
+ mode: Clutter.AnimationMode.EASE_IN_QUAD,
});
}
this.ease({
opacity: 128,
duration: SIDE_CONTROLS_ANIMATION_TIME / 2,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
layout_manager: layout,
x_expand: true,
y_expand: true,
- clip_to_allocation: true
+ clip_to_allocation: true,
});
this.dash = new Dash.Dash();
const DOWN = 1;
var PadChooser = GObject.registerClass({
- Signals: { 'pad-selected': { param_types: [Clutter.InputDevice.$gtype] } }
+ Signals: { 'pad-selected': { param_types: [Clutter.InputDevice.$gtype] } },
}, class PadChooser extends St.Button {
_init(device, groupDevices) {
super._init({
});
var KeybindingEntry = GObject.registerClass({
- Signals: { 'keybinding-edited': {} }
+ Signals: { 'keybinding-edited': {} },
}, class KeybindingEntry extends St.Entry {
_init() {
super._init({ hint_text: _("New shortcut…"), style: 'width: 10em' });
});
var ActionComboBox = GObject.registerClass({
- Signals: { 'action-selected': { param_types: [GObject.TYPE_INT] } }
+ Signals: { 'action-selected': { param_types: [GObject.TYPE_INT] } },
}, class ActionComboBox extends St.Button {
_init() {
super._init({ style_class: 'button' });
});
var ActionEditor = GObject.registerClass({
- Signals: { 'done': {} }
+ Signals: { 'done': {} },
}, class ActionEditor extends St.Widget {
_init() {
let boxLayout = new Clutter.BoxLayout({ orientation: Clutter.Orientation.HORIZONTAL,
'Editor actor',
GObject.ParamFlags.READWRITE |
GObject.ParamFlags.CONSTRUCT_ONLY,
- Clutter.Actor.$gtype)
+ Clutter.Actor.$gtype),
},
}, class PadDiagram extends St.DrawingArea {
_init(params) {
var PadOsd = GObject.registerClass({
Signals: {
'pad-selected': { param_types: [Clutter.InputDevice.$gtype] },
- 'closed': {}
- }
+ 'closed': {},
+ },
}, class PadOsd extends St.BoxLayout {
_init(padDevice, settings, imagePath, editionMode, monitorIndex) {
super._init({
vertical: true,
x_expand: true,
y_expand: true,
- reactive: true
+ reactive: true,
});
this.padDevice = padDevice;
var ANIMATION_DELAY = 100;
var PageIndicators = GObject.registerClass({
- Signals: { 'page-activated': { param_types: [GObject.TYPE_INT] } }
+ Signals: { 'page-activated': { param_types: [GObject.TYPE_INT] } },
}, class PageIndicators extends St.BoxLayout {
_init(orientation = Clutter.Orientation.VERTICAL) {
let vertical = orientation == Clutter.Orientation.VERTICAL;
x_align: vertical ? Clutter.ActorAlign.END : Clutter.ActorAlign.CENTER,
y_align: vertical ? Clutter.ActorAlign.CENTER : Clutter.ActorAlign.END,
reactive: true,
- clip_to_allocation: true
+ clip_to_allocation: true,
});
this._nPages = 0;
this._currentPage = undefined;
translation_x: isAnimationIn ? 0 : offset,
duration: baseTime + delay * i,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
- delay: isAnimationIn ? ANIMATION_DELAY : 0
+ delay: isAnimationIn ? ANIMATION_DELAY : 0,
});
}
}
this.ease({
opacity: 255,
duration: Overview.ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
opacity: 0,
mode: Clutter.Animation.EASE_OUT_QUAD,
duration: Overview.ANIMATION_TIME,
- onComplete: () => this.hide()
+ onComplete: () => this.hide(),
});
}
let boxes = {
left: this._leftBox,
center: this._centerBox,
- right: this._rightBox
+ right: this._rightBox,
};
let boxContainer = boxes[box] || this._rightBox;
this.statusArea[role] = indicator;
super._init({
style_class: 'panel-status-indicators-box',
reactive: true,
- visible: false
+ visible: false,
});
this.menu = new PopupMenu.PopupMenuSection();
}
'angle': GObject.ParamSpec.double(
'angle', 'angle', 'angle',
GObject.ParamFlags.READWRITE,
- 0, 2 * Math.PI, 0)
- }
+ 0, 2 * Math.PI, 0),
+ },
}, class PieTimer extends St.DrawingArea {
_init() {
this._angle = 0;
opacity: 0,
visible: false,
can_focus: false,
- reactive: false
+ reactive: false,
});
this.set_pivot_point(0.5, 0.5);
this.ease({
opacity: 255,
duration: duration / 4,
- mode: Clutter.AnimationMode.EASE_IN_QUAD
+ mode: Clutter.AnimationMode.EASE_IN_QUAD,
});
this.ease_property('angle', 2 * Math.PI, {
duration,
mode: Clutter.AnimationMode.LINEAR,
- onComplete: this._onTransitionComplete.bind(this)
+ onComplete: this._onTransitionComplete.bind(this),
});
}
opacity: 0,
duration: SUCCESS_ZOOM_OUT_DURATION,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onStopped: () => this.destroy()
+ onStopped: () => this.destroy(),
});
}
});
},
Signals: {
'activate': { param_types: [Clutter.Event.$gtype] },
- }
+ },
}, class PopupBaseMenuItem extends St.BoxLayout {
_init(params) {
params = Params.parse(params, {
});
var PopupSwitchMenuItem = GObject.registerClass({
- Signals: { 'toggled': { param_types: [GObject.TYPE_BOOLEAN] }, },
+ Signals: { 'toggled': { param_types: [GObject.TYPE_BOOLEAN] } },
}, class PopupSwitchMenuItem extends PopupBaseMenuItem {
_init(text, active, params) {
super._init(params);
height: naturalHeight,
duration: 250,
mode: Clutter.AnimationMode.EASE_OUT_EXPO,
- onComplete: () => this.actor.set_height(-1)
+ onComplete: () => this.actor.set_height(-1),
});
this._arrow.ease({
rotation_angle_z: targetAngle,
duration: 250,
- mode: Clutter.AnimationMode.EASE_OUT_EXPO
+ mode: Clutter.AnimationMode.EASE_OUT_EXPO,
});
} else {
this._arrow.rotation_angle_z = targetAngle;
onComplete: () => {
this.actor.hide();
this.actor.set_height(-1);
- }
+ },
});
this._arrow.ease({
rotation_angle_z: 0,
duration: 250,
- mode: Clutter.AnimationMode.EASE_OUT_EXPO
+ mode: Clutter.AnimationMode.EASE_OUT_EXPO,
});
} else {
this._arrow.rotation_angle_z = 0;
openStateChangeId: menu.connect('open-state-changed', this._onMenuOpenState.bind(this)),
destroyId: menu.connect('destroy', this._onMenuDestroy.bind(this)),
enterId: 0,
- focusInId: 0
+ focusInId: 0,
};
let source = menu.sourceActor;
opacity: 0,
delay,
duration,
- mode: Clutter.AnimationMode.EASE_IN_QUAD
+ mode: Clutter.AnimationMode.EASE_IN_QUAD,
});
ripple.ease({
scale_x: finalScale,
delay,
duration,
mode: Clutter.AnimationMode.LINEAR,
- onComplete: () => (ripple.visible = false)
+ onComplete: () => (ripple.visible = false),
});
}
onComplete: () => {
parentActor.set_height(-1);
this._errorBox.show();
- }
+ },
});
}
}
});
var NotificationsBox = GObject.registerClass({
- Signals: { 'wake-up-screen': {} }
+ Signals: { 'wake-up-screen': {} },
}, class NotificationsBox extends St.BoxLayout {
_init() {
super._init({
vertical: true,
name: 'screenShieldNotifications',
- style_class: 'screen-shield-notifications-container'
+ style_class: 'screen-shield-notifications-container',
});
this._scrollView = new St.ScrollView({ hscrollbar_policy: St.PolicyType.NEVER });
onComplete: () => {
this._scrollView.vscrollbar_policy = St.PolicyType.AUTOMATIC;
widget.set_height(-1);
- }
+ },
});
this._updateVisibility();
arrows[i].ease({
opacity: 0,
duration: ARROW_ANIMATION_TIME / 2,
- mode: Clutter.AnimationMode.EASE_IN_QUAD
+ mode: Clutter.AnimationMode.EASE_IN_QUAD,
});
- }
+ },
});
}
onComplete: () => {
this._lockScreenGroup.fixed_position_set = false;
this._lockScreenState = MessageTray.State.SHOWN;
- }
+ },
});
this._maybeCancelDialog();
y: -h,
duration,
mode: Clutter.AnimationMode.EASE_IN_QUAD,
- onComplete: () => this._hideLockScreenComplete()
+ onComplete: () => this._hideLockScreenComplete(),
});
} else {
this._hideLockScreenComplete();
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
this._lockScreenShown({ fadeToBlack, animateFade: true });
- }
+ },
});
} else {
this._lockScreenGroup.fixed_position_set = false;
scale_y: 0,
duration: animate ? Overview.ANIMATION_TIME : 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => this._completeDeactivate()
+ onComplete: () => this._completeDeactivate(),
});
}
color: GLib.Variant.new('(ddd)', [
red / 255.0,
green / 255.0,
- blue / 255.0
- ])
+ blue / 255.0,
+ ]),
}]);
this._removeShooterForSender(invocation.get_sender());
invocation.return_value(retval);
};
var SelectArea = GObject.registerClass({
- Signals: { 'finished': { param_types: [Meta.Rectangle.$gtype] } }
+ Signals: { 'finished': { param_types: [Meta.Rectangle.$gtype] } },
}, class SelectArea extends St.Widget {
_init() {
this._startX = -1;
visible: false,
reactive: true,
x: 0,
- y: 0
+ y: 0,
});
Main.uiGroup.add_actor(this);
this._rubberband = new St.Widget({
style_class: 'select-area-rubberband',
- visible: false
+ visible: false,
});
this.add_actor(this._rubberband);
}
x: Math.min(this._startX, this._lastX),
y: Math.min(this._startY, this._lastY),
width: Math.abs(this._startX - this._lastX) + 1,
- height: Math.abs(this._startY - this._lastY) + 1
+ height: Math.abs(this._startY - this._lastY) + 1,
});
}
opacity: 0,
duration: 200,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => this._grabHelper.ungrab()
+ onComplete: () => this._grabHelper.ungrab(),
});
return Clutter.EVENT_PROPAGATE;
}
});
var PickPixel = GObject.registerClass({
- Signals: { 'finished': { param_types: [Graphene.Point.$gtype] } }
+ Signals: { 'finished': { param_types: [Graphene.Point.$gtype] } },
}, class PickPixel extends St.Widget {
_init() {
super._init({ visible: false, reactive: true });
super._init(Main.uiGroup, {
inhibitEvents: true,
width: area.width,
- height: area.height
+ height: area.height,
});
this.style_class = 'flashspot';
this.set_position(area.x, area.y);
if (doneCallback)
doneCallback();
this.destroy();
- }
+ },
});
}
});
'focus-child', 'focus-child', 'focus-child',
GObject.ParamFlags.READABLE,
Clutter.Actor.$gtype),
- }
+ },
}, class SearchResultsBase extends St.BoxLayout {
_init(provider, resultsView) {
super._init({ style_class: 'search-section', vertical: true });
});
var SearchResultsView = GObject.registerClass({
- Signals: { 'terms-changed': {} }
+ Signals: { 'terms-changed': {} },
}, class SearchResultsView extends St.BoxLayout {
_init() {
super._init({ name: 'searchResults', vertical: true });
panel: {
left: [],
center: [],
- right: []
+ right: [],
},
- panelStyle: null
+ panelStyle: null,
},
'gdm': {
panel: {
left: [],
center: ['dateMenu'],
- right: ['dwellClick', 'a11y', 'keyboard', 'aggregateMenu']
+ right: ['dwellClick', 'a11y', 'keyboard', 'aggregateMenu'],
},
- panelStyle: 'login-screen'
+ panelStyle: 'login-screen',
},
'lock-screen': {
panel: {
left: [],
center: [],
- right: ['aggregateMenu']
+ right: ['aggregateMenu'],
},
- panelStyle: 'lock-screen'
+ panelStyle: 'lock-screen',
},
'unlock-dialog': {
panel: {
left: [],
center: [],
- right: ['dwellClick', 'a11y', 'keyboard', 'aggregateMenu']
+ right: ['dwellClick', 'a11y', 'keyboard', 'aggregateMenu'],
},
- panelStyle: 'unlock-screen'
+ panelStyle: 'unlock-screen',
},
'user': {
panel: {
left: ['activities', 'appMenu'],
center: ['dateMenu'],
- right: ['dwellClick', 'a11y', 'keyboard', 'aggregateMenu']
- }
- }
+ right: ['dwellClick', 'a11y', 'keyboard', 'aggregateMenu'],
+ },
+ },
};
function _loadMode(file, info) {
/* -------------------------------------------------------- */
var ListItem = GObject.registerClass({
- Signals: { 'activate': {} }
+ Signals: { 'activate': {} },
}, class ListItem extends St.Button {
_init(app) {
let layout = new St.BoxLayout({ vertical: false });
});
var ShellMountQuestionDialog = GObject.registerClass({
- Signals: { 'response': { param_types: [GObject.TYPE_INT] } }
+ Signals: { 'response': { param_types: [GObject.TYPE_INT] } },
}, class ShellMountQuestionDialog extends ModalDialog.ModalDialog {
_init(icon) {
super._init({ styleClass: 'mount-dialog' });
GObject.TYPE_BOOLEAN,
GObject.TYPE_BOOLEAN,
GObject.TYPE_BOOLEAN,
- GObject.TYPE_UINT] } }
+ GObject.TYPE_UINT] } },
}, class ShellMountPasswordDialog extends ModalDialog.ModalDialog {
_init(message, icon, flags) {
let strings = message.split('\n');
});
var ShellProcessesDialog = GObject.registerClass({
- Signals: { 'response': { param_types: [GObject.TYPE_INT] } }
+ Signals: { 'response': { param_types: [GObject.TYPE_INT] } },
}, class ShellProcessesDialog extends ModalDialog.ModalDialog {
_init(icon) {
super._init({ styleClass: 'mount-dialog' });
NONE: 0,
ASK_PASSWORD: 1,
ASK_QUESTION: 2,
- SHOW_PROCESSES: 3
+ SHOW_PROCESSES: 3,
};
var GnomeShellMountOpHandler = class {
var Slider = GObject.registerClass({
Signals: {
'drag-begin': {},
- 'drag-end': {}
- }
+ 'drag-end': {},
+ },
}, class Slider extends BarLevel.BarLevel {
_init(value) {
super._init({
primary: {
name: _("Single Click"),
icon: 'pointer-primary-click-symbolic',
- type: Clutter.PointerA11yDwellClickType.PRIMARY
+ type: Clutter.PointerA11yDwellClickType.PRIMARY,
},
double: {
name: _("Double Click"),
icon: 'pointer-double-click-symbolic',
- type: Clutter.PointerA11yDwellClickType.DOUBLE
+ type: Clutter.PointerA11yDwellClickType.DOUBLE,
},
drag: {
name: _("Drag"),
icon: 'pointer-drag-symbolic',
- type: Clutter.PointerA11yDwellClickType.DRAG
+ type: Clutter.PointerA11yDwellClickType.DRAG,
},
secondary: {
name: _("Secondary Click"),
icon: 'pointer-secondary-click-symbolic',
- type: Clutter.PointerA11yDwellClickType.SECONDARY
- }
+ type: Clutter.PointerA11yDwellClickType.SECONDARY,
+ },
};
var DwellClickIndicator = GObject.registerClass(
CITY: 4,
NEIGHBORHOOD: 5,
STREET: 6,
- EXACT: 8
+ EXACT: 8,
};
function accuracyLevelToString(accuracyLevel) {
};
var GeolocationDialog = GObject.registerClass({
- Signals: { 'response': { param_types: [GObject.TYPE_UINT] } }
+ Signals: { 'response': { param_types: [GObject.TYPE_UINT] } },
}, class GeolocationDialog extends ModalDialog.ModalDialog {
_init(name, subtitle, reqAccuracyLevel) {
super._init({ styleClass: 'geolocation-dialog' });
WIRED: 'wired',
WIRELESS: 'wireless',
WWAN: 'wwan',
- VPN: 'vpn'
+ VPN: 'vpn',
};
const NMAccessPointSecurity = {
WPA_PSK: 3,
WPA2_PSK: 4,
WPA_ENT: 5,
- WPA2_ENT: 6
+ WPA2_ENT: 6,
};
var MAX_DEVICE_ITEMS = 4;
var PortalHelperResult = {
CANCELLED: 0,
COMPLETED: 1,
- RECHECK: 2
+ RECHECK: 2,
};
const PortalHelperIface = loadInterfaceXML('org.gnome.Shell.PortalHelper');
var NMWirelessDialogItem = GObject.registerClass({
Signals: {
'selected': {},
- }
+ },
}, class NMWirelessDialogItem extends St.BoxLayout {
_init(network) {
this._network = network;
// default fallbacks
let gicon = new Gio.ThemedIcon({
name: icon,
- use_default_fallbacks: false
+ use_default_fallbacks: false,
});
this._indicator.gicon = gicon;
CONNECTED: 'connected',
AUTHORIZING: 'authorizing',
AUTH_ERROR: 'auth-error',
- AUTHORIZED: 'authorized'
+ AUTHORIZED: 'authorized',
};
var Policy = {
DEFAULT: 'default',
MANUAL: 'manual',
- AUTO: 'auto'
+ AUTO: 'auto',
};
var AuthCtrl = {
var AuthMode = {
DISABLED: 'disabled',
- ENABLED: 'enabled'
+ ENABLED: 'enabled',
};
const BOLT_DBUS_CLIENT_IFACE = 'org.freedesktop.bolt1.Manager';
// as recording because they show the input level
let skippedApps = [
'org.gnome.VolumeControl',
- 'org.PulseAudio.pavucontrol'
+ 'org.PulseAudio.pavucontrol',
];
showInput = this._control.get_source_outputs().some(output => {
}
var SwitcherPopup = GObject.registerClass({
- GTypeFlags: GObject.TypeFlags.ABSTRACT
+ GTypeFlags: GObject.TypeFlags.ABSTRACT,
}, class SwitcherPopup extends St.Widget {
_init(items) {
super._init({ style_class: 'switcher-popup',
opacity: 0,
duration: POPUP_FADE_OUT_TIME,
mode: Clutter.Animation.EASE_OUT_QUAD,
- onComplete: () => this.destroy()
+ onComplete: () => this.destroy(),
});
} else {
this.destroy();
if (this._highlighted == 0)
this._scrollableLeft = false;
this.queue_relayout();
- }
+ },
});
}
if (this._highlighted == this._items.length - 1)
this._scrollableRight = false;
this.queue_relayout();
- }
+ },
});
}
style_class: params.styleClass,
reactive: params.reactive,
width: params.iconSize * themeContext.scaleFactor,
- height: params.iconSize * themeContext.scaleFactor
+ height: params.iconSize * themeContext.scaleFactor,
});
this._iconSize = params.iconSize;
var ViewPage = {
WINDOWS: 1,
APPS: 2,
- SEARCH: 3
+ SEARCH: 3,
};
var FocusTrap = GObject.registerClass(
Signals: {
'page-changed': {},
'page-empty': {},
- }
+ },
}, class ViewSelector extends Shell.Stack {
_init(searchEntry, showAppsButton) {
super._init({
this._activePage.ease({
opacity: 255,
duration: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
opacity: 0,
duration: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onStopped: () => this._animateIn(oldPage)
+ onStopped: () => this._animateIn(oldPage),
});
}
_init() {
super._init({
name: WINDOW_DIMMER_EFFECT_NAME,
- enabled: false
+ enabled: false,
});
this._enabled = true;
}
this.actor.ease_property(`@effects.${this.name}.brightness`, color, {
mode: Clutter.AnimationMode.LINEAR,
duration: (dimmed ? DIM_TIME : UNDIM_TIME) * (animate ? 1 : 0),
- onComplete: () => this._syncEnabled()
+ onComplete: () => this._syncEnabled(),
});
this._syncEnabled();
height: tileRect.height,
opacity: 255,
duration: WINDOW_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
opacity: 0,
duration: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => this._reset()
+ onComplete: () => this._reset(),
});
}
y: 0,
duration: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => this._finishWorkspaceSwitch(switchData)
+ onComplete: () => this._finishWorkspaceSwitch(switchData),
});
}
this._minimizeWindowDone(shellwm, actor);
else
this._minimizeWindowOverwritten(shellwm, actor);
- }
+ },
});
} else {
let xDest, yDest, xScale, yScale;
y: yDest,
duration: MINIMIZE_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_IN_EXPO,
- onStopped: () => this._minimizeWindowDone(shellwm, actor)
+ onStopped: () => this._minimizeWindowDone(shellwm, actor),
});
}
}
opacity: 255,
duration: MINIMIZE_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onStopped: () => this._unminimizeWindowDone(shellwm, actor)
+ onStopped: () => this._unminimizeWindowDone(shellwm, actor),
});
} else {
let [success, geom] = actor.meta_window.get_icon_geometry();
y: yDest,
duration: MINIMIZE_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_IN_EXPO,
- onStopped: () => this._unminimizeWindowDone(shellwm, actor)
+ onStopped: () => this._unminimizeWindowDone(shellwm, actor),
});
}
}
scale_y: scaleY,
opacity: 0,
duration: WINDOW_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
actor.translation_x = -targetRect.x + sourceRect.x;
translation_y: 0,
duration: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onStopped: () => this._sizeChangeWindowDone(shellwm, actor)
+ onStopped: () => this._sizeChangeWindowDone(shellwm, actor),
});
// Now unfreeze actor updates, to get it to the new size.
scale_y: 1,
duration: SHOW_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_EXPO,
- onStopped: () => this._mapWindowDone(shellwm, actor)
+ onStopped: () => this._mapWindowDone(shellwm, actor),
});
break;
case Meta.WindowType.MODAL_DIALOG:
scale_y: 1,
duration: DIALOG_SHOW_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onStopped: () => this._mapWindowDone(shellwm, actor)
+ onStopped: () => this._mapWindowDone(shellwm, actor),
});
break;
default:
scale_y: 0.8,
duration: DESTROY_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onStopped: () => this._destroyWindowDone(shellwm, actor)
+ onStopped: () => this._destroyWindowDone(shellwm, actor),
});
break;
case Meta.WindowType.MODAL_DIALOG:
scale_y: 0,
duration: DIALOG_DESTROY_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onStopped: () => this._destroyWindowDone(shellwm, actor)
+ onStopped: () => this._destroyWindowDone(shellwm, actor),
});
break;
default:
y: yDest,
duration: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => this._switchWorkspaceDone(shellwm)
+ onComplete: () => this._switchWorkspaceDone(shellwm),
});
}
'hide-chrome': {},
'selected': { param_types: [GObject.TYPE_UINT] },
'show-chrome': {},
- 'size-changed': {}
+ 'size-changed': {},
},
}, class WindowClone extends St.Widget {
_init(realWindow, workspace) {
reactive: true,
can_focus: true,
accessible_role: Atk.Role.PUSH_BUTTON,
- layout_manager: new WindowCloneLayout()
+ layout_manager: new WindowCloneLayout(),
});
this.set_offscreen_redirect(Clutter.OffscreenRedirect.AUTOMATIC_FOR_OPACITY);
let params = {
x, y, width,
duration: Overview.ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
};
if (height !== undefined)
a.ease({
opacity: 255,
duration: WINDOW_OVERLAY_FADE_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
});
}
a.ease({
opacity: 0,
duration: WINDOW_OVERLAY_FADE_TIME,
- mode: Clutter.AnimationMode.EASE_IN_QUAD
+ mode: Clutter.AnimationMode.EASE_IN_QUAD,
});
});
}
var WindowPositionFlags = {
NONE: 0,
INITIAL: 1 << 0,
- ANIMATE: 1 << 1
+ ANIMATE: 1 << 1,
};
// Window Thumbnail Layout Algorithm
clone.ease({
opacity: 255,
mode: Clutter.AnimationMode.EASE_IN_QUAD,
- duration: Overview.ANIMATION_TIME
+ duration: Overview.ANIMATION_TIME,
});
}
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
this._showWindowOverlay(clone, overlay);
- }
+ },
});
clone.overlay.relayout(true);
}
win._overviewHint = {
x: stageX,
y: stageY,
- scale: stageWidth / clone.width
+ scale: stageWidth / clone.width,
};
}
clone.destroy();
clone.ease({
opacity,
duration,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
} else {
// The window is hidden
scale_y: 1,
opacity: 255,
duration: Overview.ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
} else {
// The window is hidden, make it shrink and fade it out
scale_y: 0,
opacity: 0,
duration: Overview.ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
}
win._overviewHint = {
x: actor.x,
y: actor.y,
- scale: actor.scale_x
+ scale: actor.scale_x,
};
let metaWindow = win.get_meta_window();
this._container.ease({
opacity: 255,
duration: ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
this.show();
}
opacity: 0.0,
duration: ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- onComplete: () => this.destroy()
+ onComplete: () => this.destroy(),
});
return GLib.SOURCE_REMOVE;
}
'drag-cancelled': {},
'drag-end': {},
'selected': { param_types: [GObject.TYPE_UINT] },
- }
+ },
}, class WindowClone extends Clutter.Actor {
_init(realWindow) {
let clone = new Clutter.Clone({ source: realWindow });
super._init({
layout_manager: new PrimaryActorLayout(clone),
- reactive: true
+ reactive: true,
});
this._delegate = this;
ANIMATING_OUT: 4,
ANIMATED_OUT: 5,
COLLAPSING: 6,
- DESTROYED: 7
+ DESTROYED: 7,
};
/**
'slide-position', 'slide-position', 'slide-position',
GObject.ParamFlags.READWRITE,
0, 1, 0),
- }
+ },
}, class WorkspaceThumbnail extends St.Widget {
_init(metaWorkspace) {
super._init({
clip_to_allocation: true,
- style_class: 'workspace-thumbnail'
+ style_class: 'workspace-thumbnail',
});
this._delegate = this;
'scale': GObject.ParamSpec.double(
'scale', 'scale', 'scale',
GObject.ParamFlags.READWRITE,
- 0, Infinity, 0)
- }
+ 0, Infinity, 0),
+ },
}, class ThumbnailsBox extends St.Widget {
_init() {
super._init({ reactive: true,
_onDragBegin() {
this._dragCancelled = false;
this._dragMonitor = {
- dragMotion: this._onDragMotion.bind(this)
+ dragMotion: this._onDragMotion.bind(this),
};
DND.addDragMonitor(this._dragMonitor);
}
onComplete: () => {
this._setThumbnailState(thumbnail, ThumbnailState.ANIMATED_OUT);
this._queueUpdateStates();
- }
+ },
});
});
thumbnail.destroy();
this._queueUpdateStates();
- }
+ },
});
});
this.ease_property('scale', this._targetScale, {
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: RESCALE_ANIMATION_TIME,
- onComplete: () => this._queueUpdateStates()
+ onComplete: () => this._queueUpdateStates(),
});
this._pendingScaleUpdate = false;
}
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
this._setThumbnailState(thumbnail, ThumbnailState.NORMAL);
- }
+ },
});
});
}
onComplete: () => {
this._animatingIndicator = false;
this._queueUpdateStates();
- }
+ },
});
}
});
var AnimationType = {
ZOOM: 0,
- FADE: 1
+ FADE: 1,
};
const MUTTER_SCHEMA = 'org.gnome.mutter';
var WorkspacesViewBase = GObject.registerClass({
- GTypeFlags: GObject.TypeFlags.ABSTRACT
+ GTypeFlags: GObject.TypeFlags.ABSTRACT,
}, class WorkspacesViewBase extends St.Widget {
_init(monitorIndex) {
super._init({ style_class: 'workspaces-view', reactive: true });
if (showAnimation) {
let easeParams = Object.assign(params, {
duration: WORKSPACE_SWITCH_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
// we have to call _updateVisibility() once before the
// animation and once afterwards - it does not really
this.scrollAdjustment.ease(index, {
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: WORKSPACE_SWITCH_TIME,
- onComplete: () => (this._animatingScroll = false)
+ onComplete: () => (this._animatingScroll = false),
});
}
y,
dragActor: this._cursorWindowClone ? this._cursorWindowClone : this._dummy,
source: this,
- targetActor: pickedActor
+ targetActor: pickedActor,
};
for (let i = 0; i < DND.dragMonitors.length; i++) {